using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using WeifenLuo.WinFormsUI.Docking;

namespace MyHunter.Contents
{
    public partial class Output : DockContent
    {
        public Output()
        {
            InitializeComponent();
        }

        #region PUBLIC
        public void WriteToOutput(string txt)
        {
            this.textBoxOutput.AppendText(txt + "\r\n");
        }
        #endregion

        #region CONTEXT MENU
        private void OnClear_click(object sender, EventArgs e)
        {
            textBoxOutput.Clear();
        }

        private void saveToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if(saveFileDialog.ShowDialog() == DialogResult.OK)
            {
                System.IO.StreamWriter sw = new System.IO.StreamWriter(saveFileDialog.FileName);
                sw.Write(this.textBoxOutput.Text);
                sw.Close();
            }
        }

        #endregion

    }
}